package com.ll.beautymall.ui.home.brand;

import android.content.Intent;
import android.support.v7.widget.Toolbar;
import android.webkit.WebView;
import android.widget.ImageView;
import android.widget.TextView;

import com.ll.beautymall.R;
import com.ll.beautymall.base.BaseActivity;
import com.ll.beautymall.bean.Brand;
import com.ll.beautymall.utils.CommonUtil;

import butterknife.BindView;
import butterknife.OnClick;

public class BrandActivity extends BaseActivity {

    @BindView(R.id.iv_category_detail_back)
    ImageView ivCategoryDetailBack;
    @BindView(R.id.tv_category_detail_title)
    TextView tvCategoryDetailTitle;
    @BindView(R.id.tb_category_detail_toolbar)
    Toolbar tbCategoryDetailToolbar;
    @BindView(R.id.wv_brand)
    WebView wvBrand;

    @Override
    public int getLayoutId() {
        return R.layout.activity_brand;
    }

    @Override
    public void initView() {
        Intent intent = getIntent();
        Brand brand = (Brand) intent.getSerializableExtra("brand");
        String title = brand.getTitle();
        tvCategoryDetailTitle.setText(title);

        CommonUtil.configWebview(wvBrand, brand.getMobile_cps_url());
    }

    @OnClick(R.id.iv_category_detail_back)
    public void onClick() {
        finish();
    }

}
